#include <iostream>
#include <atomic>

class my_data { };

std::shared_ptr<my_data> p;
void process_global_data() {
    std::shared_ptr<my_data> local = std::atomic_load(&p);
    process_data(local);
}

void process_data(std::shared_ptr<my_data> local) {
    
}

void update_global_data() {
    std::shared_ptr<my_data> local(new my_data);
}
